<@master template="master/master-p2p" title="${title}标的信息" appendCss="css.kindeditor">
<div class="detailsBox">

<form action="/bidRest/save_bid"
	class="action-ajax-form action-ajax-form-valid action-ajax-form-confirm"
	action-ajax-form-confirm-message="确认提交" id="queryForm"
	name="queryForm" method='post'>
	<div class="openBox">
		<h3>
			<i class="jtIco"></i>标的基本信息
		</h3>
		<div class="detaiTab">
				<table width="100%" cellspacing="0" cellpadding="0" border="0">
					<tbody>
						<tr>
							<td  width="15%" align="right" class="bg">借款人:</td>
							<td><@autocomplete
								url="/common/getLoaneerInfo?loaneeId=" name="loaneeName"
								class="tabInp action-valid-field"
								data\-action\-valid\-rule="required;"
								data\-action\-valid\-msg\-required="客户名称不能为空！" id="loaneeId"
								value="${bid.loaneeName}"  hideIdName="loaneeId" hideIdValue="${bid.loaneeId}" />(联想) 
								<span><font color="red">*</font></span>
								<span class="action-field-error" for="loaneeId" style="color: red;"></span>
							
							</td>
							<td width="15%" align="right" class="bg">借款标题:</td>
							<td><input type="text" name="title"
								class="tabInp action-valid-field"
								data-action-valid-rule="required;"
								data-action-valid-msg-required="借款标题不能为空！" value="${bid.title}"
								id="title">
								 <span><font color="red">*</font></span> 
								 <span class="action-field-error" for="title" style="color: red;"></span>
							</td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">年化利率:</td>
							<td width="35%"><input type="text" name="annualizedYield"
								class="tabInp action-valid-field"
								data-action-valid-rule="required;number;maxlength:15;reg:^\d*$|^(\d+(\.\d{1,2})*)$;"
								data-action-valid-msg-number="年化利率只能输入数字"
								value="${bid.annualizedYield}" id="annualizedYield">%
								 <span><font color="red">*</font></span>
								 <span class="action-field-error" for="annualizedYield" style="color: red;"></span>
							</td>
							<td width="15%" align="right" class="bg">借款金额:</td>
							<td><input type="text" name="loanAmount"
								class="tabInp action-valid-field"
								data-action-valid-rule="required;number;maxlength:15;reg:^\d*$|^(\d+(\.\d{1,2})*)$;"
								data-action-valid-msg-number="借款金额只能输入数字"
								value="${bid.loanAmount}" id="loanAmount">元 
								<span><font color="red">*</font></span>
								<span class="action-field-error" for="loanAmount" style="color: red;"></span>
							</td>
						</tr>
						<tr>
						    <td width="15%"  align="right" class="bg">项目编号:</td>
							<td><input type="text" name="billCode"
								class="tabInp action-valid-field"
								data-action-valid-rule="required;maxlength:32"
								data-action-valid-msg-required="项目编号不能为空！" value="${bid.billCode}"
								id="billCode">
								 <span><font color="red">*</font></span> 
								 <span class="action-field-error" for="billCode" style="color: red;"></span></td>
							<td width="15%" align="right" class="bg">起投金额:</td>
							<td><input type="text"
								name="lowestInvestentAmount" class="tabInp action-valid-field"
								data-action-valid-rule="required;number;maxlength:15;reg:^\d*$|^(\d+(\.\d{1,2})*)$;"
								data-action-valid-msg-number="起投金额只能输入数字"
								value="${bid.lowestInvestentAmount}" id="lowestInvestentAmount">元
								<span><font color="red">*</font></span> 
								<span class="action-field-error" for="lowestInvestentAmount" style="color: red;"></span>
							</td>
						</tr>
						<tr>
						    <td width="15%" align="right" class="bg">借款类型:</td>
							<td><@select dataSouceType="group"
								id="groupTeam" name="groupTeam" class="tabInp
								action-valid-field" data\-action\-valid\-rule="required;"
								data\-action\-valid\-msg\-required="借款类型不能为空！"
								value="${bid.groupTeam}"/>
								<span><font color="red">*</font></span>
								<span class="action-field-error" for="groupTeam" style="color: red;"></span>
							</td>
							<td width="15%" align="right" class="bg">还款方式:</td>
							<td><@select dataSouceType="refund_type"
								name="refundType" data\-action\-valid\-rule="required;"
								data\-action\-valid\-msg\-required="还款方式不能为空！" class="tabInp
								action-valid-field" value="${bid.refundType}" id="refundType" />
								<span><font color="red">*</font></span>
								<span class="action-field-error" for="refundType" style="color: red;"></span>
							</td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">募集开始日期:</td>
							<td><#assign
								showTime='${(bid.onlineTime?string("yyyy-MM-dd"))!}'/> <@date
								value="${bid.onlineTime}" id="onlineTime" class="tabInp
								action-valid-field" data\-action\-valid\-rule="required;"
								data\-action\-valid\-msg\-required="募集开始日期不能为空！" name="onlineTime" />
								 <span><font color="red">*</font></span> 
								 <span class="action-field-error" for="onlineTime" style="color: red;"></span>
							</td>
							<td width="15%"  align="right" class="bg">募集截止日期:</td>
							<td width="35%"><#assign
								showTime='${(bid.failureTime?string("yyyy-MM-dd"))!}'/> <@date
								value="${bid.failureTime}" id="failureTime" class="tabInp
								action-valid-field" data\-action\-valid\-rule="required;"
								data\-action\-valid\-msg\-required="募集截止日期不能为空！"
								name="failureTime" /> 
								<span><font color="red">*</font></span> 
								<span class="action-field-error" for="failureTime" style="color: red;"></span>
							</td>
						</tr>
						
						<tr>
							<td width="15%" align="right" class="bg">借款期限:</td>
							<td>
								<span class="action-form-field-group">
									<input type="text" name="deadline"
									class="tabInp action-valid-field"
									data-action-valid-rule="maxlength:11;number;reg:^[0-9]*$;"
									data-action-valid-msg-number="起投金额只能输入数字"
									value="${bid.deadline}" id="deadline"> 
									<span class="action-field-error" for="deadline" style="color: red;"></span> 
								</span>
								<span class="action-form-field-group">
									<@select dataSouceType="deadlineType" name="deadlineType" class="tabInp
									action-valid-field" data\-action\-valid\-rule="required;"
									data\-action\-valid\-msg\-required="借款期限类型不能为空！"
									value="${bid.deadlineType}" id="deadlineType" />
									<span><font color="red">*</font></span>
									<span class="action-field-error" for="deadlineType" style="color: red;"></span>
								</span>
							</td>
							
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">借款用途:</td>
							<td colspan="3">
								<textarea name="objectIntro"
									id="objectIntro" class="tabInp action-valid-field"
									data-action-valid-rule="required;"
									data-action-valid-msg-number="借款用途不能为空！"
									style="width: 400px; height: 117px;">${bid.objectIntro}</textarea>
								<span><font color="red">*</font></span> <span
								class="action-field-error" for="objectIntro" style="color: red;"></span>
							</td>
						</tr>
						<tr>
						    <td width="15%"  align="right" class="bg">标的详情:</td>
						    <td colspan="3"> 
						      <textarea id="bidcontent" name="content" style="width:700px;height:300px;">${bidExt.content}</textarea>
						    </td>
						</tr>
						
				
					</tbody>
				</table>
		</div>

		<div class="clearfix" align="center">
			 <input type="hidden" name="opType" value="${vo.opType}" />
			 <input type="hidden" name="id" value="${bid.id}" />
			 <input type="submit" name="comfirm" id="comfirm" class="btn_auto_30 btn_blue" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</div>
	</div>
 </form>
		
	<div class="openBox">
		<h3>
			<i class="jtIco"></i>标的基本信息
		</h3>
		<div class="detaiTab">
				<table width="100%" cellspacing="0" cellpadding="0" border="0">	
		               <tr>
					<td width="15%" align="right" class="bg" width="35%">标的合同：</td>
					<td colspan="3">
					        <@fileUpload url="/bid_file/upload/BID_CONTRACT?keyCode=${bid.id}" title="上传"/>
					        <#if fileList?has_content>
								<#list fileList as datalist>
									 <#if datalist.fileTypeCode?? && datalist.fileTypeCode == "BID_CONTRACT">
										<div class="fl lh30 ml10">
											<a href="/file/download?fileId=${datalist.fileId}"
												target="_blank" class="a_ud">${datalist.originalName}</a>&nbsp;&nbsp;&nbsp;(<a
												href="/file/del?fileId=${datalist.fileId}" target="_self"
												class="action-ajax-btn">删除</a>)
										</div> 
									</#if> 
									 <#if datalist_index == 0 && datalist.fileTypeCode == "BID_CONTRACT">
							    		 <input type="hidden" name="contract" id="contract" value="${datalist.fileId}">
							    	</#if>
								</#list>
							<#else>
						        	<input type="hidden" name="contract" id="contract" value="${contract}">
						    </#if>
					</td>
				</tr>
				<tr>
					<td width="15%" align="right" class="bg">标的证件：</td>
					<td colspan="3">
					    <@fileUpload url="/bid_file/upload/BID_CARD?keyCode=${bid.id}" title="上传"/>
					    <#if fileList?has_content>
								<#list fileList as datalist> 
									<#if datalist.fileTypeCode?? &&datalist.fileTypeCode == "BID_CARD">
										<div class="fl lh30 ml10">
											<a href="/file/download?fileId=${datalist.fileId}"
												target="_blank" class="a_ud">${datalist.originalName}</a>&nbsp;&nbsp;&nbsp;(<a
												href="/file/del?fileId=${datalist.fileId}" target="_self"
												class="action-ajax-btn">删除</a>)
										</div> 
										<#if datalist_index == 0 && datalist.fileTypeCode == "BID_CARD">
								    		 <input type="hidden" name="contract" id="contract" value="${datalist.fileId}">
								    	</#if>
									</#if> 
								</#list>
						<#else>
					        	<input type="hidden" name="card" id="card" value="${card}">
					    </#if>
					</td>
				</tr>
		</table>
		</div>
		
   </div>
		
		<div class="clearfix" align="center">
			<a class="btn_auto_30 btn_blue ml10" href="/bid/index" target="_self">返回</a>
		</div>
		
		
		

</div>

<@js src="js.kindeditor;js.kindeditorMin;js.kindeditorZh_CN"/>


 
 <@js>  
 
 KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content"]', {
				cssPath : '<@cdn value="css.prettify"/>',
				uploadJson : '/common/upload/bidContent',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['queryForm'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['queryForm'].submit();
					});
				}
			});
			prettyPrint();
		});
  
  </@js>
 
</@master>